package org.ihelpuoo.weboo.action.http;

import java.util.List;

import org.ihelpuoo.util.Pager;
import org.ihelpuoo.util.PagerList;
import org.ihelpuoo.weboo.module.ActionContext;

public abstract class AjaxListAction extends AjaxAction
{

	@Override
	protected Object doAjax(ActionContext context) throws Exception
	{
		Pager pager = context.params().getPager();
		List list = generateList(context,context.params().getPager());
		return new PagerList(list,pager);
	}

	protected abstract List generateList(ActionContext context, Pager pager) throws Exception;

}
